<template>
  <div>
    <van-popup v-model="show"
               position="bottom"
               duration="0.3"
               :style="{ height: '30%' }">
      内容
    </van-popup>
    <div class="bottom">
      <div class="cart"
           @click="toPopup">
        <div>
          <div class="icon">
            <van-icon name="shopping-cart"
                      size="30px" />
          </div>
          <div class="totalPrice">¥0</div>
        </div>
        <div class="delivery">另需配送费4元</div>
      </div>
      <div class="toBill">¥20起送</div>
    </div>
  </div>

</template>

<script>
export default {
  data () {
    return {
      show: false
    }
  },
  methods: {
    toPopup () {
      if (this.show) {
        this.show = false
      } else {
        this.show = true
      }
    }
  }
}
</script>

<style lang="less" scoped>
.bottom {
  position: relative;
  z-index: 100000;
  height: 8vh;
  line-height: 8vh;
  display: flex;
  color: rgb(144, 148, 152);
}
.cart {
  width: 7.3333rem;
  display: flex;
  background: rgb(21, 28, 38);
}
.cart > div:nth-child(1) {
  display: flex;
  width: 4rem;
  position: relative;
  // justify-content: space-evenly;
  justify-content: flex-end;
}
.icon {
  width: 1.3333rem;
  height: 1.3333rem;
  // line-height: 1.4667rem;
  // text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: -0.32rem;
  left: 0.6667rem;
  border: 0.1867rem solid rgb(21, 28, 38);
  border-radius: 50%;
  z-index: 1;
  background: rgb(43, 52, 57);
}
.totalPrice {
  height: 1.3333rem;
  width: 1.3333rem;
  text-align: center;
  line-height: 1.3333rem;
  margin-right: 0.1867rem;
}
.delivery {
  width: 3.2rem;
  font-size: 0.3733rem;
}
.totalPrice {
  font-size: 0.5333rem;
}
.toBill {
  font-size: 0.4533rem;
  text-align: center;
  width: 2.6667rem;
  border-left: 1px solid rgb(43, 52, 57);
  background: rgb(43, 52, 57);
}
</style>